﻿Option Strict On
Module Module1
    Sub Main()

        Dim p As ICliente = New Seniorita
        Operacion(p)

        Dim ar As New List(Of Integer)

        ar.Add(p)


    End Sub
    Public Sub Operacion(ByVal Cl As ICliente)

        Cl.Comprar()
    End Sub
End Module
Public MustInherit Class Persona
    Public MustOverride ReadOnly Property Titulo
    Public nombre As String
    Public dni As String
    Public Overridable Sub ShowData()
        Console.WriteLine(Titulo + " " + nombre)
    End Sub
End Class
Public MustInherit Class Mujer
    Inherits Persona
    Implements ICliente

    Public Overrides Sub ShowData()
        MyBase.ShowData()
    End Sub
    Public Overridable Sub Comprar() Implements ICliente.Comprar
        Console.WriteLine("Compra supermercado")
    End Sub
End Class
Public Class Seniorita
    Inherits Mujer


    Public Overrides ReadOnly Property Titulo As Object
        Get
            Return "Srta"
        End Get
    End Property
    Public Overrides Sub Comprar()
        Console.WriteLine("Comprar online")
    End Sub
End Class
Public Class Seniora
    Inherits Mujer


    Public Overrides ReadOnly Property Titulo As Object
        Get
            Return "Sra"
        End Get
    End Property
End Class
Public Class Hombre
    Inherits Persona
    Public Overrides ReadOnly Property Titulo As Object
        Get
            Return "Sr"
        End Get
    End Property
End Class

Public Interface ICliente
    Sub Comprar()
End Interface


